{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "263f71ab",
   "metadata": {},
   "outputs": [],
   "source": [
    "from total_plot import plot_it\n",
    "import numpy as np\n",
    "\n",
    "x_labels = [20, 60, 100, 140, 180]\n",
    "idx_ratio = [10000/190, 10000/1770, 10000/4950, 10000/9700, 10000/16113]\n",
    "idx_ratio_1 = [1/190, 1/1770, 1/4950, 1/9730, 1/16110]\n",
    "\n",
    "optimal_ratio = [\n",
    "    0.606609881,\n",
    "    0.601624406,\n",
    "    0.54334635,\n",
    "    0.522883534,\n",
    "    0.532883534,]\n",
    "optimal_ratio_1 = [\n",
    "    0.79950967,\n",
    "    0.800383543,\n",
    "    0.814297882,\n",
    "    0.843184302,\n",
    "    0.853184302,]\n",
    "swap_vals = np.array([\n",
    "    [1649/2, 0],\n",
    "    [15311/2, 0],\n",
    "    [54178/2, 0],\n",
    "    [138884/2, 0],\n",
    "    [308884/2, 0],\n",
    "])\n",
    "greedy_vals = np.array([\n",
    "    [536-190, 3380],\n",
    "    [5188-1770, 31498],\n",
    "    [17000-4950, 93976],\n",
    "    [39229-9730, 210869],\n",
    "    [79229-16110, 410869],\n",
    "])\n",
    "optimal_vals = np.array([\n",
    "    [536-190, 3380-190],\n",
    "    [5188-1770, 31498-1770],\n",
    "    [17000-4950, 93976-4950],\n",
    "    [39229-9730, 210869-9730],\n",
    "    [79229-16110, 410869-16110],\n",
    "])\n",
    "colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "border_colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "plot_it(swap_vals, greedy_vals, optimal_vals, idx_ratio_1, optimal_ratio, optimal_ratio_1, x_labels, colors, border_colors, 'fig/qubit_num_vqa.pdf')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "xs",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
